import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}

//快讯列表
export function newsList(params) {   
    return request({
        url: `/kyy/news/v1/list`,
        method: 'get',
        params
    })
}
//卡优优快讯评论列表
export function newsCommentList(params) {
    return request({
        url: `/kyy/news/v1/comment/list`,
        method: 'get',
        params
    })
}
// 中台 显示-隐藏 快讯评论
export function changeStatus(id) {
    return request({
        url: `/kyy/news/v1/comment/changeStatus/${id}`,
        method: 'put',
        
    })
}
//中台 显示-隐藏
export function listChangeStatus(id) {
    return request({
        url: `/kyy/news/v1/changeStatus/${id}`,
        method: 'put',
        
    })
}


//新增 快讯
export function addNews(data) {
    return request({
      url: '/kyy/news/v1',
      method: 'post',
      data
    })
}
//修改卡优优快讯
export function editNews(data) {
    return request({
      url: '/kyy/news/v1',
      method: 'put',
      data
    })
}
//获取卡优优快讯详情
export function newDetail(id) {
    return request({
        url: `/kyy/news/v1/getInfo/${id}`,
        method: 'get',
    })
}

//删除 快讯
export function deleteNews(id) {
    return request({
        url: `/kyy/news/v1/${id}`,
        method: 'DELETE',
    })
}
